package cn.jiyun.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author author
 * @since 2024-11-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("xm_order")
@ApiModel(value="Order对象", description="")
public class XmOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "交易编号")
    private String transactionId;

    @ApiModelProperty(value = "买家昵称")
    private String customerNickname;

    @ApiModelProperty(value = "手机号码（买家）")
    private String buyerPhone;

    @ApiModelProperty(value = "店铺ID")
    private Integer sid;

    @ApiModelProperty(value = "配送员id")
    private Integer cid;

    @ApiModelProperty(value = "订单类型")
    private String orderType;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime creationTime;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "付款时间")
    private LocalDateTime paymentTime;

    @ApiModelProperty(value = "使用设备")
    private String deviceUsed;

    @ApiModelProperty(value = "取餐号码")
    private String pickupNumber;

    @ApiModelProperty(value = "餐具数量")
    private Integer quantity;

    @ApiModelProperty(value = "订单备注")
    private String orderNote;

    @ApiModelProperty(value = "收货地址")
    private String receivingAddress;

    @ApiModelProperty(value = "配送方式")
    private String deliveryMethod;

    @ApiModelProperty(value = "预计送达时间")
    @JsonFormat(pattern = "MM月dd日 HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime expectedDeliveryTime;

    @ApiModelProperty(value = "发票类型")
    private String invoiceType;

    @ApiModelProperty(value = "发票内容")
    private String invoiceContent;

    @ApiModelProperty(value = "发票抬头")
    private String invoiceCompany;

    @ApiModelProperty(value = "企业税号")
    private String taxId;

    @ApiModelProperty(value = "开具发票")
    private String invoiceIssuance;

    @ApiModelProperty(value = "预留手机号")
    private String reservedPhone;

    @ApiModelProperty(value = "订单状态（0：开始 1：顾客下单 2：顾客付款  3：商家接单 4：顾客取货 5：评价）")
    private Integer orderStatus;

    @ApiModelProperty(value = "收货人姓名")
    private String name;

    @ApiModelProperty(value = "订单状态（0：正在交易 1：交易完成）")
    private Integer status;

    @ApiModelProperty(value = "总价格")
    private Double price;

    @ApiModelProperty(value = "是否退款(0：不退款  1：退款)")
    private Integer isRefunded;

    @ApiModelProperty(value = "退款状态（0：发起申请 1：商家处理 2：退款完毕）")
    private Integer refundStatus;

    @ApiModelProperty(value = "纠纷处理id（0：无纠纷 1：有纠纷）")
    private Integer jid;

//    手机号
    @TableField(exist = false)
    private String tel;
//时间查询
    @TableField(exist = false)
    private Integer ztime;

//    商店名称
    @TableField(exist = false)
    private String shopname;
//    商店电话
    @TableField(exist = false)
    private String shoptel;
//    所在地区
    @TableField(exist = false)
    private String shopregion;
//    详细地址
    @TableField(exist = false)
    private String shopaddress;

//    派送员
    @TableField(exist = false)
    private String painame;

    //    派送员手机号
    @TableField(exist = false)
    private String paitel;

    @TableField(exist = false)
    private List<XmOrderGoodslist> goods;

    @TableField(exist = false)
    private List<XmRefund> xmRefunds;

    @TableField(exist = false)
    private List<XmOrderGoodslist> xmOrderGoodslists;
}
